/*
   Copyright (c) 2019 Shanghai Xuanzi Technology Co. Ltd https://xuanzi.ltd
   XZMindMap is licensed under the Mulan PSL v1.
   You can use this software according to the terms and conditions of the Mulan PSL v1.
   You may obtain a copy of Mulan PSL v1 at:
      http://license.coscl.org.cn/MulanPSL
   THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
   PURPOSE.
   See the Mulan PSL v1 for more details.

*/

package xuanzi.openmind.scenes.base;

import xuanzi.commons.graphics.PointF;
import xuanzi.openmind.layout.Box;
import xuanzi.openmind.layout.HBox;
import xuanzi.openmind.layout.VBox;
import xuanzi.openmind.nodes.Node;
import xuanzi.openmind.renders.RenderBuffer;

public class NorthEastScene extends BoxScene{
 
	  
	
	public NorthEastScene() {
		  
	}
	 
	public Box setupBoxs(Node node,Box parent) {
		
		Box centerBox = new VBox(50,0);
		parent.add(centerBox);
		centerBox.align = Box.ALIGN_START;
		centerBox.space = itemSpace();
		Box rbox = new VBox();
		Box border = new HBox();
		
		border.add(new Box(64,0)); 
		//centerBox.add(new Box(16, 20));
		border.add(rbox);
		centerBox.add(border);
		node.renderBuffer.onLayout(centerBox);
		rbox.space = itemSpace();
		centerBox.space = itemSpace();
		rbox.align = Box.ALIGN_START;
		return rbox;
	}

 
	@Override
	protected void onLayoutChanged(Node node) {
		// TODO Auto-generated method stub
		RenderBuffer buffer = node.renderBuffer;
		{
			buffer.frontPoint.x = buffer.bound.left;
			buffer.frontPoint.y = buffer.bound.centerY();
			buffer.backPoint.x = buffer.bound.left+16;
			buffer.backPoint.y = buffer.bound.top;
		}
		super.onLayoutChanged(node);
	}
}
